package com.hmkj.core.model.order;

import com.hmkj.core.po.operate.Agent;
import com.hmkj.core.po.order.Order;
import com.hmkj.core.po.user.User;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.function.Consumer;

@Data
public class OrderModel extends Order {
    private User u;

    private User iu;

    private Agent ag;

    /**
     * 累计用户
     */
    private long sumUser;
    /**
     * 累计点买数量
     */
    private long sumBuyNum;

    /**
     * 累计点买盈亏
     */
    private BigDecimal sumBuyProfit;

    /**
     * 累计跟单数量
     */
    private long sumFollowNum;

    /**
     * 累计跟单盈亏
     */
    private BigDecimal sumFollowProfit;

    /**
     * 累计穿仓
     */
    private BigDecimal sumPenetrate;

    /**
     * 累计手续费
     */
    private BigDecimal sumFee;

    /**
     * 累计分佣金额
     */
    private BigDecimal sumDivided;

    /**
     * 汇率
     */
    @ApiModelProperty(value = "汇率")
    private  BigDecimal exchangeRate;
    /**
     * 每点合约价值
     */
    @ApiModelProperty(value = "每点合约价值")
    private  BigDecimal pointVlaue;
    /**
     * 最小波动点
     */
    @ApiModelProperty(value = "最小波动点")
    private  BigDecimal waveMin;
    /**
     * 最新价
     */
    @ApiModelProperty(value = "最新价")
    private  BigDecimal lastPrice;

    public OrderModel(){}

    public OrderModel(Consumer<OrderModel> consumer){
        consumer.accept(this);
    }

}
